﻿#ifndef SKINMGR_H
#define SKINMGR_H

#include <QObject>

typedef enum SkinId {
    SK_Main = 0,
    SK_PLAYER
}SkinID;

typedef struct QssFile{
    SkinId id;
    const char *name;
} QssFile;

class SkinMgr : public QObject
{
    Q_OBJECT
public:
    static  SkinMgr* inst() {
        static SkinMgr* _inst = 0;
        if(!_inst) {
            _inst = new SkinMgr(0);
        }
        return _inst;
    }

    void    setSkin(SkinId id, QWidget* w);

private:
    explicit SkinMgr(QObject *parent = 0);
    QString loadQss(QString qssFile);
    QString dealLine(const QString& lineText, qreal dip);
};

#endif // SKINMGR_H
